#ifndef _DATABASE_TEXT_H
#define _DATABASE_TEXT_H

#include "Database_Common.h"

struct SortedChoiceItemTextOpcode {
	unsigned int id;
	wstring label;
	wstring converted;
	wstring help;
	int length;
	int type;
	wstring* arg_help;
};

struct SortedChoiceItemTextSteamOpcode {
	wstring id;
	int arg_amount;
	wstring help;
	wstring converted;
};

static SortedChoiceItem HADES_STRING_TEXT_BLOCK_NAME[] = {
	{ 0x0, L"Generic UI" },
	{ 0x1, L"Debug Room" },
	{ 0x2, L"Prima Vista" },
	{ 0x3, L"Alexandria Castle (1)" },
	{ 0x4, L"Evil Forest" },
	{ 0x7, L"Cleyra Trunk" },
	{ 0x8, L"Ice Cavern" },
	{ 0x12, L"Red Rose" },
	{ 0x16, L"Lindblum Castle (1)" },
	{ 0x17, L"Mist Gates" },
	{ 0x1E, L"Terra" },
	{ 0x1F, L"Mountain Path" },
	{ 0x20, L"Conde Petie" },
	{ 0x21, L"Alexandria (1)" },
	{ 0x25, L"Black Mage Village (1)" },
	{ 0x26, L"Mognet Central" },
	{ 0x28, L"Prima Vista (Ruin)" },
	{ 0x2A, L"Quan's Dwelling" },
	{ 0x2C, L"Cleyra" },
	{ 0x2F, L"Dali" },
	{ 0x32, L"Dali Underground" },
	{ 0x33, L"Gizamaluke Grotto" },
	{ 0x34, L"Bran Bal" },
	{ 0x35, L"Observatory Mountain" },
	{ 0x3F, L"Cargo Ship" },
	{ 0x44, L"World Map" },
	{ 0x46, L"Treno (1)" },
	{ 0x47, L"Qu's Marsh" },
	{ 0x4A, L"South Gate" },
	{ 0x4D, L"Burmecia" },
	{ 0x58, L"Alexandria Castle (3)" },
	{ 0x59, L"Alexander" },
	{ 0x5A, L"Alexandria (2)" },
	{ 0x5B, L"Alexandria (Night)" },
	{ 0x79, L"Shrines" },
	{ 0x7C, L"Oeilvert" },
	{ 0x86, L"Pinnacle Rocks" },
	{ 0xA6, L"Daguerreo" },
	{ 0xBA, L"Hilda Garde III" },
	{ 0xBB, L"Ending" },
	{ 0xBD, L"Invincible" },
	{ 0xDF, L"Treno & Supersoft" },
	{ 0x114, L"Lindblum (1)" },
	{ 0x121, L"Alexandria Castle (2)" },
	{ 0x122, L"Cleyra (Stormless)" },
	{ 0x158, L"Pandemonium" },
	{ 0x166, L"Madain Sari (1)" },
	{ 0x167, L"Gargan Roo" },
	{ 0x168, L"Madain Sari (2)" },
	{ 0x169, L"Fossil Roo" },
	{ 0x1E4, L"Mount Gulug" },
	{ 0x1E5, L"Lindblum (Occupied)" },
	{ 0x20D, L"Lindblum Castle (Occupied)" },
	{ 0x253, L"Lindblum (2)" },
	{ 0x2B6, L"Memoria" },
	{ 0x2E2, L"Iifa Tree Roots" },
	{ 0x2E3, L"Ipsen Castle" },
	{ 0x2E4, L"Desert Palace" },
	{ 0x2E5, L"Treno (2)" },
	{ 0x2F2, L"Alexandria Castle (Ruin)" },
	{ 0x38C, L"Esto Gaza" },
	{ 0x3AF, L"Lindblum Castle (2)" },
	{ 0x3B0, L"Iifa Tree" },
	{ 0x3B1, L"Chocobo Places" },
	{ 0x3B2, L"Alexandria (Ruin)" },
	{ 0x431, L"Black Mage Village (2)" },
	{ 0x1000, L"Charmap" }
};

// Should always be sorted by id
#define TEXT_OPCODE_FORMAT_TYPE 0x80 // 0x80 and next ones
static SortedChoiceItemTextOpcode HADES_STRING_TEXT_OPCODE[] = {
	{ 0x00, L"0x00", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x01, L"TIMED_END", L"", L"Terminate the dialog after few seconds\nOnly use at the end of the string", 1, 1, new wstring[1]{ L"Time to wait" } },
	{ 0x02, L"SLOW", L"", L"Slow down the appearing rate\n1 is the slowest", 1, 1, new wstring[1]{ L"Slow ratio" } },
	{ 0x03, L"FORMAT:Bubble Position", L"", L"Configure the absolute position of the bubble", 3, TEXT_OPCODE_FORMAT_TYPE+1, new wstring[3]{ L"X position", L"Z position", L"Y position" } },
	{ 0x04, L"TOKENIZE", L"", L"Create tokens from the string to be used in other strings\nMust be the only opcode of the string", -1, 4, new wstring[2]{ L"Token amount", L"Tokens" } },
	{ 0x05, L"0x05", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x06, L"VAR_TOKEN", L"Token", L"Replaced by a tokenized string from another string", 2, 2, new wstring[2]{ L"Text ID", L"Script ID" } },
	{ 0x07, L"FORMAT:Multichoice", L"", L"Setup a multichoice's number of choices and its 'Cancel' choice", 2, TEXT_OPCODE_FORMAT_TYPE+2, new wstring[2]{ L"Number of choices", L"Cancel choice" } },
	{ 0x08, L"MULTICHOICE", L"", L"Each line becomes a choice inside the dialog", 0, 0, NULL },
	{ 0x09, L"AUTO_END", L"", L"Terminate the dialog after few seconds\nOnly use at the end of the string", 0, 0, NULL },
	{ 0x0A, L"DISPLAY_PROGRESSIVE", L"", L"Progressively display the text (default behavior)", 0, 0, NULL },
	{ 0x0B, L"FORMAT:Skip Closing Animation", L"", L"Instantatly hide the text window instead of shrinking it on closure", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x0C, L"DISPLAY_INSTANT", L"", L"Instantatly display the whole string", 0, 0, NULL },
	{ 0x0D, L"FORMAT:Width", L"", L"Setup variable bubble width: arguments are -1 terminated lists using the pattern (line number, default width, (opcode1, opcode1_args, ...), ...)", -1, TEXT_OPCODE_FORMAT_TYPE+4, NULL },
	{ 0x0E, L"VAR_ITEM", L"Item", L"Replaced by some item's name set by the game script", 1, 1, new wstring[1]{ L"Script ID" } },
	{ 0x0F, L"PROGRESSION", L"", L"Update the dialog's step progression for use of the game script", 1, 1, new wstring[1]{ L"Step" } },
	{ 0x10, L"ZIDANE", L"Zidane", L"Replaced by Zidane's name", 0, 0, NULL },
	{ 0x11, L"VIVI", L"Vivi", L"Replaced by Vivi's name", 0, 0, NULL },
	{ 0x12, L"DAGGER", L"Dagger", L"Replaced by Dagger's name", 0, 0, NULL },
	{ 0x13, L"STEINER", L"Steiner", L"Replaced by Steiner's name", 0, 0, NULL },
	{ 0x14, L"FREYA", L"Freya", L"Replaced by Freya's name", 0, 0, NULL },
	{ 0x15, L"QUINA", L"Quina", L"Replaced by Quina's name", 0, 0, NULL },
	{ 0x16, L"EIKO", L"Eiko", L"Replaced by Eiko's name", 0, 0, NULL },
	{ 0x17, L"AMARANT", L"Amarant", L"Replaced by Amarant's name", 0, 0, NULL },
	{ 0x18, L"PARTY_1", L"Cinna", L"Replaced by the name of the external character", 0, 0, NULL },
	{ 0x19, L"PARTY_2", L"Marcus", L"Replaced by the name of the external character (2)", 0, 0, NULL },
	{ 0x1A, L"PARTY_3", L"Blank", L"Replaced by the name of the external character (3)", 0, 0, NULL },
	{ 0x1B, L"PARTY_4", L"Beatrix", L"Replaced by the name of the external character (4)", 0, 0, NULL },
	{ 0x1C, L"0x1C", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x1D, L"0x1D", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x1E, L"0x1E", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x1F, L"0x1F", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x20, L"WHITE", L"", L"Change the color to white", 0, 0, NULL },
	{ 0x21, L"WHITE_NO_SHADOW", L"", L"Change the color to white with no shadow", 0, 0, NULL },
	{ 0x22, L"GREY", L"", L"Change the color to grey", 0, 0, NULL },
	{ 0x23, L"RED", L"", L"Change the color to red", 0, 0, NULL },
	{ 0x24, L"YELLOW", L"", L"Change the color to yellow", 0, 0, NULL },
	{ 0x25, L"CYAN", L"", L"Change the color to cyan", 0, 0, NULL },
	{ 0x26, L"MAUVE", L"", L"Change the color to mauve", 0, 0, NULL },
	{ 0x27, L"GREEN", L"", L"Change the color to green", 0, 0, NULL },
	{ 0x28, L"BLACK_HELP", L"", L"Change the color to black\nHelp dialogs only", 0, 0, NULL },
	{ 0x29, L"RED_HELP", L"", L"Change the color to red\nHelp dialogs only", 0, 0, NULL },
	{ 0x2A, L"0x2A", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x2B, L"0x2B", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x2C, L"0x2C", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x2D, L"0x2D", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x2E, L"0x2E", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x2F, L"BUTTON_PAD", L"Pad", L"Replaced by a directional cross image", 0, 0, NULL },
	{ 0x30, L"BUTTON_CIRCLE", L"Circle", L"Replaced by a Circle button", 0, 0, NULL },
	{ 0x31, L"BUTTON_CROSS", L"Cross", L"Replaced by a Cross button", 0, 0, NULL },
	{ 0x32, L"BUTTON_TRIANGLE", L"Triangle", L"Replaced by a Triangle button", 0, 0, NULL },
	{ 0x33, L"BUTTON_SQUARE", L"Square", L"Replaced by a Square button", 0, 0, NULL },
	{ 0x34, L"BUTTON_L1", L"L1", L"Replaced by a L1 button", 0, 0, NULL },
	{ 0x35, L"BUTTON_R1", L"R1", L"Replaced by a R1 button", 0, 0, NULL },
	{ 0x36, L"BUTTON_L2", L"L2", L"Replaced by a L2 button", 0, 0, NULL },
	{ 0x37, L"BUTTON_R2", L"R2", L"Replaced by a R2 button", 0, 0, NULL },
	{ 0x38, L"BUTTON_START", L"Start", L"Replaced by a Start button", 0, 0, NULL },
	{ 0x39, L"BUTTON_SELECT", L"Select", L"Replaced by a Select button", 0, 0, NULL },
	{ 0x3A, L"BUTTON_UP", L"Up", L"Replaced by a Up button", 0, 0, NULL },
	{ 0x3B, L"BUTTON_DOWN", L"Down", L"Replaced by a Down button", 0, 0, NULL },
	{ 0x3C, L"BUTTON_LEFT", L"Left", L"Replaced by a Left button", 0, 0, NULL },
	{ 0x3D, L"BUTTON_RIGHT", L"Right", L"Replaced by a Right button", 0, 0, NULL },
	{ 0x3E, L"BUTTON_L2", L"L2", L"Replaced by a L2 button", 0, 0, NULL },
	{ 0x3F, L"BUTTON_R2", L"R2", L"Replaced by a R2 button", 0, 0, NULL },
	{ 0x40, L"VAR_NUM", L"0", L"Replaced by some number set by the game script", 1, 1, new wstring[1]{ L"Script ID" } },
	{ 0x41, L"PAUSE", L"", L"Stop the appearance for few seconds", 1, 1, new wstring[1]{ L"Frame to wait" } },
	{ 0x42, L"RESUME_SPEED", L"", L"Resume the appearing rate", 0, 0, NULL },
	{ 0x43, L"CARET_POSITION_REL", L"", L"Temporary change the caret horizontal position in the line", 1, 1, new wstring[1]{ L"Relative position" } },
	{ 0x44, L"CARET_POSITION_ABS", L"", L"Change the caret position", 1, 1, new wstring[1]{ L"Absolute position" } },
	{ 0x45, L"0x45", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x46, L"PROGRESSION_INCREASE", L"Increase the dialog's step progression by 1 for use of the game script", L"Unknown Opcode", 0, 0, NULL },
	{ 0x47, L"0x47", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x48, L"CENTER", L"", L"Center the text", -1, 5, new wstring[1]{ L"Arguments (usually 2: Width/Height)" } },
	{ 0x49, L"CARET_POSITION_Y_ADD", L"", L"Temporary change the caret vertical position", 1, 1, new wstring[1]{ L"Relative position" } },
	{ 0x4A, L"CARET_POSITION_Y_SUB", L"", L"Temporary change the caret vertical position", 1, 1, new wstring[1]{ L"Relative position" } },
	{ 0x4B, L"IMAGE", L"[IMG]", L"Replaced by an image", 1, 1, new wstring[1]{ L"Image ID" } },
	{ 0x4C, L"ICON_ITEM", L"[ICON]", L"Replaced by the icon of an item", 1, 1, new wstring[1]{ L"Item ID" } },
	{ 0x4D, L"RAM_STATUS", L"[ICON]", L"Replaced by a status icon - Use RAM setup", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x4E, L"RAM_EQUIPMENT", L"[ICON]", L"Replaced by an equipment icon - Use RAM setup", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x4F, L"FORMAT:Multichoice Masked", L"", L"Setup the number of choices and the 'Cancel' choice of a multichoice with potentially masked choices", 2, TEXT_OPCODE_FORMAT_TYPE+2, new wstring[2]{ L"Number of choices", L"Cancel choice" } },
	{ 0x50, L"FORMAT:Tail Down Right", L"", L"Display the bubble over the talker, with the tail on the right", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x51, L"FORMAT:Tail Down Left", L"", L"Display the bubble over the talker, with the tail on the left", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x52, L"FORMAT:Tail Up Right", L"", L"Display the bubble under the talker, with the tail on the right", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x53, L"FORMAT:Tail Up Left", L"", L"Display the bubble under the talker, with the tail on the left", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x54, L"FORMAT:Tail Down Center", L"", L"Display the bubble over the talker, with the tail on the center", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x55, L"FORMAT:Tail Up Center", L"", L"Display the bubble under the talker, with the tail on the center", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x56, L"0x56", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x57, L"0x57", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x58, L"FORMAT:Tail Down Right!", L"", L"Force the display the bubble over the talker, with the tail on the right", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x59, L"FORMAT:Tail Down Left!", L"", L"Force the display the bubble over the talker, with the tail on the left", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x5A, L"FORMAT:Tail Up Right!", L"", L"Force the display the bubble under the talker, with the tail on the right", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x5B, L"FORMAT:Tail Up Left!", L"", L"Force the display the bubble under the talker, with the tail on the left", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x5C, L"FORMAT:Tail Default", L"", L"Let the game decide where to display the bubble", 0, TEXT_OPCODE_FORMAT_TYPE, NULL },
	{ 0x5D, L"0x5D", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x5E, L"0x5E", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x5F, L"FORMAT:Offset", L"", L"Add an offset to the position of the bubble from the talker's position", 6, TEXT_OPCODE_FORMAT_TYPE+3, NULL },
	{ 0x60, L"BUTTONEX_CIRCLE", L"Circle", L"Replaced by the confirm button", 0, 0, NULL },
	{ 0x61, L"BUTTONEX_CROSS", L"Cross", L"Replaced by the cancel button", 0, 0, NULL },
	{ 0x62, L"BUTTONEX_TRIANGLE", L"Triangle", L"Replaced by the menu button", 0, 0, NULL },
	{ 0x63, L"BUTTONEX_SQUARE", L"Square", L"Replaced by the moogle button", 0, 0, NULL },
	{ 0x64, L"BUTTONEX_L1", L"L1", L"Replaced by the button associated to L1", 0, 0, NULL },
	{ 0x65, L"BUTTONEX_R1", L"R1", L"Replaced by the button associated to R1", 0, 0, NULL },
	{ 0x66, L"BUTTONEX_L2", L"L2", L"Replaced by the button associated to L2", 0, 0, NULL },
	{ 0x67, L"BUTTONEX_R2", L"R2", L"Replaced by the button associated to R2", 0, 0, NULL },
	{ 0x68, L"RAM_NUM", L"0", L"Replaced by a number - Use RAM setup", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x69, L"RAM_TEXT", L"Text", L"Replaced by some text - Use RAM setup", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x6A, L"0x6A", L"", L"Unknown Opcode", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x6B, L"RAM_DATA", L"", L"Replaced by a character's data value - Use RAM setup", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x6C, L"RAM_NUM_DESIGN", L"0", L"Replaced by a designed number - Use RAM setup", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x6D, L"0x6D", L"", L"Unknown Opcode", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x6E, L"0x6E", L"", L"Unknown Opcode", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x6F, L"0x6F", L"", L"Unknown Opcode", 1, 1, new wstring[1]{ L"Unknown" } },
	{ 0x70, L"IMAGE_NEW", L"!New", L"Possibly replaced by a 'New' indicator", 1, 1, new wstring[1]{ L"Script ID" } },
	{ 0x71, L"INDENT", L"", L"Same as CARET_POSITION_ABS(18)", 0, 0, NULL },
	{ 0x72, L"0x72", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x73, L"0x73", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x74, L"0x74", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x75, L"0x75", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x76, L"0x76", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x77, L"0x77", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x78, L"0x78", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x79, L"0x79", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x7A, L"0x7A", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x7B, L"0x7B", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x7C, L"0x7C", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x7D, L"0x7D", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x7E, L"0x7E", L"", L"Unknown Opcode", 0, 0, NULL },
	{ 0x7F, L"0x7F", L"", L"Unknown Opcode", 0, 0, NULL }
};

#define TEXT_STEAM_OPCODE_CLOSING_TAG 52
static SortedChoiceItemTextSteamOpcode HADES_STRING_TEXT_STEAM_OPCODE[] = {
	{ L"STRT",	2,	L"Setup the size of the dialog bubble\n - Size X\n - Size Y",	L"" },
	{ L"ID",	0,	L"DialogID (unused)",						L"" },
	{ L"CHOO",	0,	HADES_STRING_TEXT_OPCODE[8].help,			L"" },
	{ L"TIME",	1,	L"Use at the end of a text instead of [ENDN]\nPrevent the player to close the window\nMay also determine the time at which the window automatically closes\n - Signed integer N:\n -- If N>0, the window closes in N frames\n -- If N=-1, the window never closes by itself or by the player",	L"" },
	{ L"FLIM",	0,	HADES_STRING_TEXT_OPCODE[0xA].help,			L"" },
	{ L"NANI",	0,	HADES_STRING_TEXT_OPCODE[0xB].help,			L"" },
	{ L"IMME",	0,	HADES_STRING_TEXT_OPCODE[0xC].help,			L"" },
	{ L"SPED",	1,	L"Slow down the appearing rate\n - Speed factor (1 is the slowest)",			L"" },
	{ L"ZDNE",	0,	HADES_STRING_TEXT_OPCODE[0x10].help,		HADES_STRING_TEXT_OPCODE[0x10].converted },
	{ L"VIVI",	0,	HADES_STRING_TEXT_OPCODE[0x11].help,		HADES_STRING_TEXT_OPCODE[0x11].converted },
	{ L"DGGR",	0,	HADES_STRING_TEXT_OPCODE[0x12].help,		HADES_STRING_TEXT_OPCODE[0x12].converted },
	{ L"STNR",	0,	HADES_STRING_TEXT_OPCODE[0x13].help,		HADES_STRING_TEXT_OPCODE[0x13].converted },
	{ L"FRYA",	0,	HADES_STRING_TEXT_OPCODE[0x14].help,		HADES_STRING_TEXT_OPCODE[0x14].converted },
	{ L"QUIN",	0,	HADES_STRING_TEXT_OPCODE[0x15].help,		HADES_STRING_TEXT_OPCODE[0x15].converted },
	{ L"EIKO",	0,	HADES_STRING_TEXT_OPCODE[0x16].help,		HADES_STRING_TEXT_OPCODE[0x16].converted },
	{ L"AMRT",	0,	HADES_STRING_TEXT_OPCODE[0x17].help,		HADES_STRING_TEXT_OPCODE[0x17].converted },
	{ L"PTY1",	0,	HADES_STRING_TEXT_OPCODE[0x18].help,		HADES_STRING_TEXT_OPCODE[0x18].converted },
	{ L"PTY2",	0,	HADES_STRING_TEXT_OPCODE[0x19].help,		HADES_STRING_TEXT_OPCODE[0x19].converted },
	{ L"PTY3",	0,	HADES_STRING_TEXT_OPCODE[0x1A].help,		HADES_STRING_TEXT_OPCODE[0x1A].converted },
	{ L"PTY4",	0,	HADES_STRING_TEXT_OPCODE[0x1B].help,		HADES_STRING_TEXT_OPCODE[0x1B].converted },
	{ L"HSHD",	0,	L"Make the text have an understated shadow",	L"" },
	{ L"NSHD",	0,	L"Remove the understated shadow of the text",	L"" },
	{ L"DBTN",	1,	L"Replaced by a controller button without taking care of the player's settings (ignored on mobile platforms)\n - Button name among START/SELECT/PAD/UP/DOWN/LEFT/RIGHT/CROSS/SQUARE/CIRCLE/TRIANGLE/L1/L2/R1/R2",			L"[BTN]" },
	{ L"NFOC",	0,	L"Prevent the player to close the window",	L"" },
	{ L"INCS",	0,	HADES_STRING_TEXT_OPCODE[0x46].help,		L"" },
	{ L"CBTN",	1,	L"Replaced by a controller button taking care of the player's custom button settings (ignored on mobile platforms)\n - Button name among START/SELECT/PAD/UP/DOWN/LEFT/RIGHT/CROSS/SQUARE/CIRCLE/TRIANGLE/L1/L2/R1/R2",		L"[BTN]" },
	{ L"PNEW",	0,	HADES_STRING_TEXT_OPCODE[0x70].help,		HADES_STRING_TEXT_OPCODE[0x70].converted },
	{ L"MOVE",	2,	L"Change the caret temporary position in both directions\n - X offset to add\n - Y offset toward top to add",	L"" },
	{ L"ENDN",	0,	L"Must be appended at the end of most texts",	L"" },
	{ L"TEXT",	2,	HADES_STRING_TEXT_OPCODE[0x6].help+L"\n - ID of the tokenized text\n - ID of the variable token",	HADES_STRING_TEXT_OPCODE[0x6].converted },
	{ L"ITEM",	1,	HADES_STRING_TEXT_OPCODE[0xE].help+L"\n - ID of the variable item",		HADES_STRING_TEXT_OPCODE[0xE].converted },
	{ L"SIGL",	1,	HADES_STRING_TEXT_OPCODE[0xF].help+L"\n - Progression step",			L"" },
	{ L"NUMB",	1,	HADES_STRING_TEXT_OPCODE[0x40].help+L"\n - ID of the variable number",	HADES_STRING_TEXT_OPCODE[0x40].converted },
	{ L"WAIT",	1,	HADES_STRING_TEXT_OPCODE[0x41].help+L"\n - Frames to wait",				L"" },
	{ L"FEED",	1,	HADES_STRING_TEXT_OPCODE[0x43].help+L"\n - X offset to add",			L"" },
	{ L"XTAB",	1,	HADES_STRING_TEXT_OPCODE[0x44].help+L"\n - X absolute offset",			L"" },
	{ L"YADD",	1,	HADES_STRING_TEXT_OPCODE[0x49].help+L"\n - Y offset toward top to add",	L"" },
	{ L"YSUB",	1,	HADES_STRING_TEXT_OPCODE[0x4A].help+L"\n - Y offset toward bottom to add",	L"" },
	{ L"ICON",	1,	HADES_STRING_TEXT_OPCODE[0x4B].help+L"\n - Icon ID",					L"[IMG]" },
	{ L"PCHC",	2,	HADES_STRING_TEXT_OPCODE[0x7].help+L"\n - Number of choices\n - 'Cancel' choice",	L"" },
	{ L"PCHM",	2,	HADES_STRING_TEXT_OPCODE[0x4F].help+L"\n - Number of choices\n - 'Cancel' choice",	L"" },
	{ L"MPOS",	2,	HADES_STRING_TEXT_OPCODE[0x3].help+L"\n - X screen position\n - Y screen position",	L"" },
	{ L"OFFT",	3,	HADES_STRING_TEXT_OPCODE[0x5F].help+L"\n - X position\n - Z position\n - Y position",	L"" },
	{ L"TAIL",	1,	L"Set the bubble's tail position, effectively setting the bubble's position in the process\n - A position among: LOR/LOL/LOC/UPR/UPL/UPC/LORF/LOLF/UPRF/UPLF/DEFT",	L"" },
	{ L"TBLE",	-1,	L"Create tokens for an usage in other texts\n - Ignored arguments ; each token is separated by a new line",		L"" },
	{ L"WDTH",	-1,	L"Setup variable bubble width: arguments are -1 terminated lists using the pattern (line number, default width, (opcode1, opcode1_args, ...), ...)\nExample: [WDTH,0,50,16,14,0,-1] means that the line 0, of default size 50, contains the names [ZDNE] and [ITEM=0] which sizes are added\n"\
					L"List of opcodes:\n 6: [TEXT] token\n 14: [ITEM] item name\n From 16 to 27: names of party members\n 64: [NUMB] number\n 112: [PNEW] new icon",	L"" },
	{ L"CENT",	1,	HADES_STRING_TEXT_OPCODE[0x48].help+L"\n - Line width (ignored argument)",	L"" },
	{ L"PAGE",	0,	L"Add a new page of text, displaying after the previous one without redrawing the text window",	L"" },
	{ L"MOBI",	1,	L"Replaced by an icon on mobile platforms only\n - Mobile icon ID",		L"[IMG]" },
	{ L"SPAY",	0,	L"Spacing height (unused)",							L"" },
	{ L"KCBT",	1,	L"Replaced by a keyboard button icon (ignored on mobile platforms)\n - Button name among START/SELECT/PAD/UP/DOWN/LEFT/RIGHT/CROSS/SQUARE/CIRCLE/TRIANGLE/L1/L2/R1/R2",	L"[KEY]" },
	{ L"JCBT",	1,	L"Replaced by a joystick button icon (ignored on mobile platforms)\n - Button name among START/SELECT/PAD/UP/DOWN/LEFT/RIGHT/CROSS/SQUARE/CIRCLE/TRIANGLE/L1/L2/R1/R2",	L"[BTN]" },
	{ L"url",	1,	L"Add an internet URL inside the [url=...][/url] tag\nDoesn't work for most of the texts",	L"" },
	{ L"b",		0,	L"Bold the text inside the [b][/b] tag",			L"" },
	{ L"i",		0,	L"Italicise the text inside the [i][/i] tag",		L"" },
	{ L"u",		0,	L"Underline the text inside the [u][/u] tag",		L"" },
	{ L"s",		0,	L"Strike the text inside the [s][/s] tag",			L"" },
	{ L"c",		0,	L"Ignore the color inside the [c][/c] tag",			L"" },
	{ L"sub",	0,	L"Subscript the text inside the [sub][/sub] tag\nThe display of superscript and subscript is bugged inside the editor",	L"" },
	{ L"sup",	0,	L"Superscript the text inside the [sup][/sup] tag\nThe display of superscript and subscript is bugged inside the editor",	L"" }
};



#endif
